import request from '@/utils/request'
//课程体系列表
export function getCourseLevel(data) {
  return request({
    url: '/admin/course-levels',
    method: 'get',
    data
  })
}
//排序
export function sortTabList(data) {
  console.log(data)
  return request({
    url: '/admin/course-level/sort ',
    method: 'post',
    data
  })
}
//添加课程体系
export function addCourseLevel(data) {
  return request({
    url: '/admin/course-level',
    method: 'post',
    data
  })
}
//删除课程体系
export function deleteCourseLevel(data) {
  return request({
    url: `/admin/course-level/${data.id}/del`,
    method: 'post',
    data
  })
}
//课程体系详情  
export function courseLevelInfo(data) {
  return request({
    url: `/admin/course-level/${data.id}`,
    method: 'get',
    data
  })
}
//编辑课程体系
export function editCourseLevel(data) {
  return request({
    url: `/admin/course-level/${data.id}/edit`,
    method: 'post',
    data
  })
}
//课程列表 
export function getCoursesList(params) {
  return request({
    url: `/admin/courses`,
    method: 'get',
    params
  })
}
//添加课程 
export function addCourse(data) {
  return request({
    url: `/admin/course`,
    method: 'post',
    data
  })
}
//课程详情
export function courseInfo(data) {
  return request({
    url: `/admin/course/${data.id}`,
    method: 'get',
    data
  })
}
//编辑课程
export function editCourse(data) {
  return request({
    url: `/admin/course/${data.id}/edit`,
    method: 'post',
    data
  })
}
//删除课程
export function deleteCourse(data) {
  return request({
    url: `/admin/course/${data.id}/del`,
    method: 'post',
    data
  })
}
//习题集列表
export function getCourseQuestion(params) {
  return request({
    url: `/admin/course-question-sets`,
    method: 'get',
    params
  })
}
//添加习题集 
export function addCourseQuestion(data) {
  return request({
    url: `/admin/course-question-set`,
    method: 'post',
    data
  })
}
//习题集详情
export function getCourseQuestionInfo(data) {
  return request({
    url: `/admin/course-question-set/${data.id}`,
    method: 'get',
    data
  })
}
//编辑习题集
export function editCourseQuestion(data) {
  return request({
    url: `/admin/course-question-set/${data.id}/edit`,
    method: 'post',
    data
  })
}
//删除习题集
export function deleteCourseQuestion(data) {
  return request({
    url: `/admin/course-question-set/${data.id}/del`,
    method: 'post',
    data
  })
}
//习题集下习题列表
export function cocourseQuestions(data) {
  return request({
    url: `/admin/course-question-set/${data.id}/${data.type}/questions`,
    method: 'get',
    data
  })
}
//添加编辑习题  
export function conmitCocourseQuestions(data) {
  return request({
    url: `/admin/course-question-set/${data.course_question_set_id}/add-question`,
    method: 'post',
    data
  })
}





